<template>
  <div>
    <DaoHang1Vue :identityChangeData="identityChangeData" :username="username"></DaoHang1Vue>
    <DropDownListVue :ListData="ListData"></DropDownListVue>
    <InfoBoxVue></InfoBoxVue>
  </div>
</template>

<script>

import DaoHang1Vue from './components/DaoHang1.vue'
import DropDownListVue from './components/DropDownList.vue'
import InfoBoxVue from './components/InfoBox.vue'

export default {
  data(){
    return {

          username:'',
          data:{},
      //后续添加导航栏在这里按照格式加
          

          ListData:[
            {
              title:'师生双选管理',
              children: [
                {
                title: '上传选题',
                location: '/#/teacher/addNew',
                },
                {
                  title:'选题双选审核',
                  location: '/#/teacher/chooseStu',
                },
                {
                  title:'双选结果列表',
                  location: '/#/teacher/myBiShe',
                },
                ],
              },
              {
              title:'文件',
              children: [
                {
                title: '学生上传的开题报告',
                location: '/#/teacher/ExamineOpeningSpeach',
                },
                {
                  title:'学生上传的最终报告',
                  location: '/#/teacher/ExamineFinalSpeach',
                },
                
                ],
              },
          ],
            

              //根据身份不同变化的数据
              identityChangeData:[
                {
                  skillName: '个人中心',
                  location: ''
                },
                {
                  skillName: '退出登录',
                  location: '/#/'
                }
              ],
    }
  },
  components: {
      DropDownListVue,
      DaoHang1Vue,
      InfoBoxVue,
    },
    created(){
      this.username = this.$route.query.username
      this.data = this.$route.query.data
      this.identity = this.$route.query.identity
        this.identityChangeData.forEach(e =>{
          if(e.skillName === '个人中心')
            e.location = `/#/${this.identity}/personalInfo?username=${this.username}&identity=${this.identity}`
        })
      }
}
</script>

<style>

</style>